<?php

class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
{

	protected function _initView()
	{
		$view = new Zend_View( );
		$view->doctype( 'XHTML1_STRICT' );
		$view->headTitle( 'My First Zend Framework Application' );

		// ViewRenderer
		$viewRenderer = Zend_Controller_Action_HelperBroker::getStaticHelper(
				'ViewRenderer' );
		$viewRenderer->setView( $view );

		$view->headMeta()->appendHttpEquiv( 'Content-Type',
				'text/html; charset=UTF-8' );
		//		$view->headLink()->appendStylesheet( 'http://zquick.vpak.dv.rbc.ru/Auto/public/css/style.css' );


		// save
		return $view;
	}

	protected function _initDispatcher()
	{
		$this->bootstrap( 'frontController' );
		$front = $this->frontController;

		$front->setParam( 'useDefaultControllerAlways', false );

		$dispatcher = new TRF_Controller_Dispatcher();
		$dispatcher->setControllerDirectory(
				array(
						'default' => APPLICATION_PATH . '/modules/default/controllers',
						//'articles' => APPLICATION_PATH . '/modules/articles/controllers',
						'admin' => APPLICATION_PATH . '/modules/admin/controllers' ) );
		$front->setDispatcher( $dispatcher );

		return $dispatcher;
	}
}
